﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.min.js"></script>
</head>
<body>
      <div class="fun_title">
            _h.Page 对象
      </div>
      <div class="fun_content">
            描述：页面内核对象<br />
      </div>
      <div class="fun_title2">
            属性:
      </div>
      <div class="fun_content2">
           h.Page.MouseX：鼠标在页面中的 X 坐标值。<br />
           h.Page.MouseY：鼠标在页面中的 Y 坐标值。<br />
           h.Page.MouseMoveHandle=function(){}：鼠标在页面中移动时触发的事件句柄。默认为：null<br />
           h.Page.MouseUpHandle=function(){}：用户在鼠标位于页面之上时释放鼠标按钮时触发的事件句柄。默认为：null<br />
           h.Page.InitHandle=function(){};：页面DOM加载完成，自定义标记初始化以前触发的事件句柄。默认为：null<br />
           h.Page.OnLoadHandle=function(){}：自定义标记初始化完成后触发的事件句柄。默认为：null<br />
            <br />
      </div>
      <div class="fun_title2">
            示例:
      </div>
      <div class="code">
            &lt;div id=&quot;msg&quot;&gt;&lt;/div&gt;<br />
            &lt;script type=&quot;text/javascript&quot;&gt;
            <br />
&nbsp;&nbsp;&nbsp; _h.Page.MouseMoveHandle = function ()
            <br />
&nbsp;&nbsp;&nbsp; {
            <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var msg = _g(&quot;#msg&quot;);
            <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msg.html(&quot;X=&quot; + _h.Page.MouseX + &quot; Y=&quot; + 
            _h.Page.MouseY);
            <br />
&nbsp;&nbsp;&nbsp; };
            <br />
&nbsp;&nbsp;&nbsp; _h.Page.InitHandle = function ()
            <br />
&nbsp;&nbsp;&nbsp; {
            <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(&quot;do Init&quot;);
            <br />
&nbsp;&nbsp;&nbsp; };
            <br />
&nbsp;&nbsp;&nbsp; _h.Page.OnLoadHandle = function ()
            <br />
&nbsp;&nbsp;&nbsp; {
            <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert(&quot;do OnLoad&quot;);
            <br />
&nbsp;&nbsp;&nbsp; };<br />
            &lt;/script&gt;</div>

      <br />
      <a href="PageDemo.htm" target="_blank">执行示例</a>
      <script type="text/javascript">
            function run_click() {
                  var htmltemp = _g("#htmltemp");
                  var htmlcode = _g("#htmlcode");
                  htmltemp.innerHTML = htmlcode.value;
                  var jscode = _g("#jscode");
                  eval(jscode.value);
            }
      </script>
</body>
</html>
